IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'InvoiceFetch')
	BEGIN
		DROP  Procedure  InvoiceFetch
	END

GO

CREATE Procedure InvoiceFetch
(
	@typeFlag int
)
AS

SELECT * FROM VW_InvoiceFetch
WHERE TypeFlag = @typeFlag

GO